<html>
	<head>
		<meta charset="utf-8">
		<title>元素对象</title>
		<script>
			window.onload = function() {
				var imgObj = document.getElementById("img1");
				//修改图片属性值，图片标记的属性，元素对象也能使用
				imgObj.width = 50;
				imgObj.src = "image/day6/01.jpg";
				//核心DOM中的属性方法，元素对象都能用
				imgObj.parentNode.bgColor = "#ccc";
			}
		</script>
	</head>
	<body>
		<img id="img1" src="image/day6/xingxing.gif" alt="小星星">
	</body>
</html>